package restless.menu {
	
	import restless.core.gameObjs.RLEBlitMC;
	import restless.core.gameObjs.RLEButton;
	import restless.menu.Menu;
	import restless.core.managers.RLERender;
	import restless.core.interfaces.iMenu;
	import restless.core.gameObjs.RLEButton;
	
	/**
	 * 
	 * @author Jordan Laine
	 * 
	 */
		
	public class Credits extends Menu {
		
		public function Credits(parentMenu:iMenu) {
			sID = "Credits";
			super(parentMenu);
		}
		
		override public function click(num:int):void {
			super.click(num);
			trace(sID + " click!");
		}
		
		override protected function createParentMenuButton():void {
			parentMenuButton = new RLEButton(parentMenu);
			parentMenuButton.sID = "Credits";
			parentMenuButton.switchGFX(gfxM.getBDV("button"), true );
			parentMenuButton.layer = 2;
			parentMenuButton.menu = this;
			
			tempTextObj = parentMenuButton.addText(sID, sID, "Default", parentMenuButton.x + parentMenuButton.centerX, parentMenuButton.y + parentMenuButton.centerY);
			tempTextObj.master = parentMenuButton;
			tempTextObj.center = true;
			tempTextObj.shouldItFollow( true, true);
			tempTextObj.layer = 2;
		}
		
		public function addCredit(name:String, role:String, x:int, y:int, format:String, gfx:RLEBlitMC = null):void {
			tempTextObj = addText("name", name + " " + role, format, x, y);
			tempTextObj.center = true;
			tempTextObj.shouldItFollow(true, true);
			tempTextObj.layer = 2;
			
			
			if (gfx != null) {
				gfx.x = tempTextObj.x - gfx.width;
				gfx.y = tempTextObj.y;
				gfx.updating = (true);
			}
		}
		
		override public function set activate(value:Boolean):void {
			tempBool = value;
			super.activate = tempBool;
			background.updating = (tempBool);
			
		}
		
		override public function back():void {
			super.back();
		}
		
		override public function update():void {
			super.update();
		}
		
		override public function render():void {
			super.render();
		}
		
	}
}